package net.lzzy.practices.repositories;

import net.lzzy.practices.entities.Chapter;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.UUID;

/**
*@author liaodcc on 2022/5/30 8:42.
 * 返回两个实体类，表，映射类
*/
public interface ChapterRepository extends JpaRepository<Chapter, UUID> {
    List<Chapter> findChaptersByCourseIdOrderByUpdateTime(UUID courseId);
    List<Chapter> findChaptersByCourseIdAndOpenOrderByUpdateTimeDesc(UUID courseId,boolean open);
}
